package com.example.todolist.dto;

import cn.hutool.core.util.StrUtil;
import lombok.*;

@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
public final class TodoParameter {
    private String content;

    public static TodoParameter of(final String content) {
        if (StrUtil.isEmpty(content)) {
            throw new IllegalArgumentException("Empty content is not allowed");
        }

        return new TodoParameter(content);
    }
}
